name: Rust

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:

    runs-on: windows-latest

    steps:
    - uses: actions/checkout@v2
    - name: Build
      run: cargo build --verbose
    - name: Run tests
      run: cargo test --verbose
    - name: Upload a Build Artifact
      uses: actions/upload-artifact@v2
      with:
          # Artifact name
        name: echocli.exe
    # A file, directory or wildcard pattern that describes what to upload
        path: ${{ env.REPO_NAME }}\target\debug

    - name: Download artifact
      uses: actions/download-artifact@v1.0.0
      with:
        name: 
          echocli.exe
        path:
          ${{ env.REPO_NAME }}\target\debug
